﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:GameLogic_Logic="clr-namespace:GameLogic.Logic;assembly=GameLogic"
    mc:Ignorable="d"
    x:Class="TestUi.Content.FollowMouseGame">

    <Grid
        x:Name="LayoutRoot"
        Width="400"
        Height="400">
        <Grid.Background>
            <LinearGradientBrush>
                <GradientStop
                    Color="#FF525252"
                    Offset="0" />
                <GradientStop
                    Color="#FF06001B"
                    Offset="1" />
            </LinearGradientBrush>
        </Grid.Background>

        <Rectangle
            x:Name="_moveMe"
            HorizontalAlignment="Center"
            Margin="0"
            Width="100"
            VerticalAlignment="Center"
            Height="30"
            Stroke="Black"
            RadiusX="2"
            RadiusY="2">
            <Rectangle.Fill>
                <LinearGradientBrush
                    EndPoint="0.5,1"
                    StartPoint="0.5,0">
                    <GradientStop
                        Color="#FFFB7300"
                        Offset="0" />
                    <GradientStop
                        Color="#FF211410"
                        Offset="1" />
                </LinearGradientBrush>
            </Rectangle.Fill>
            <i:Interaction.Behaviors>
                <GameLogic_Logic:FollowMouseBehavior
                    FollowPosition="XY" />
            </i:Interaction.Behaviors>
        </Rectangle>
    </Grid>
</UserControl>